<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
  <rect width="100" height="100" color="green" fill="black">
    <animate attributeName="fill" from="currentColor" to="currentColor" begin="0s" dur="0.01s" fill="freeze" additive="sum" onend="checkResult()"/>
  </rect>
</svg>
<script>
var jsTestIsAsync = true;

function checkResult() {
  shouldBe("getComputedStyle(document.querySelector('rect')).fill", "'rgb(0, 128, 0)'");
  finishJSTest();
}
</script>
